import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/page/Login'
import Index from '@/page/Index'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/module',
      children: [{
        path: '/sys/module',
        name: 'module',
        component: () => import('@/page/system_manager/ModuleManager'),
        meta: {
          title: '模块管理'
        }
      },
      {
        path: '/sys/role',
        name: 'role',
        component: () => import('@/page/system_manager/RoleManager'),
        meta: {
          title: '角色管理'
        }
      },
     ]
    }
  ]
})
